package com.zhny.iot.yw.pluginHz.model;

import com.zhny.aiot.plugin.ActionValue;
import com.zhny.aiot.plugin.PropertyValue;
import com.zhny.aiot.plugin.model.*;
import lombok.Data;

/**
 * @Author pengshuai
 * @Date 2025/3/7
 */
@Data
public class YWFertilizerStoreEntity extends StoreEntity {
    //订阅读主题：A000000001/r
    //订阅写主题：A000000001/w
    //            ID 	点位	    读写	类型
    //            1.1	出水阀开到位	只读	bool
    //            1.2	出水阀关到位	只读	bool
    //            1.3	泵故障	    只读	bool
    //            1.4	泵运行	    只读	bool
    //            1.5	远程就地(1为远程，0为就地)	只读	bool
    //            1.6	远程一键启动	读写	bool
    //            1.7	远程一键停止	读写	bool
    //            1.8	运行时长	    只读	short
    //            1.9	设定时长	    读写	short

    @PropertyValue(alias = "注肥泵",description = "注肥泵",unit = "",icon=IconConstract.Other,variableType=VariableType.WaterPump,actions={
            @ActionValue(name=Operate.Open,commandCode="start",eventType=EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="stop",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="readAll",eventType=EventType.Click)
    })
    private String pumpStatus;

    @PropertyValue(alias = "设定时长",description = "设定时长",unit = "min",icon=IconConstract.Other,variableType=VariableType.InputValue,actions={
            @ActionValue(name=Operate.Value,commandCode="setRunTimeValue",paramClass= FertilizerParam.class,eventType=EventType.Input),
            @ActionValue(name=Operate.Query,commandCode="readAll",eventType=EventType.Click)
    })
    private String runTimeSetValue;

    @PropertyValue(alias = "出水阀",description = "出水阀状态",unit = "",icon= IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="readAll",eventType=EventType.Click)
    })
    private String outValveStatus;

    @PropertyValue(alias = "运行时长",description = "运行时长",unit = "min",icon= IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="readAll",eventType=EventType.Click)
    })
    private String runTime;

    @PropertyValue(alias = "远程/就地模式",description = "远程/就地模式",unit = "",icon= IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="readAll",eventType=EventType.Click)
    })
    private String operateModelStatus;

    @PropertyValue(alias = "泵运行状态",description = "泵运行状态",unit = "",icon= IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="readAll",eventType=EventType.Click)
    })
    private String pumpRunStatus;
}
